import React, {  } from 'react';
import {  NavLink, Outlet } from 'react-router-dom'

const Home = () => {
  // const [sum, setSum] = useState (1)
  return (
    <div>
      {/* <h2>home</h2>
      {sum ===2? <Navigate to='/about' replace={true}></Navigate> : <h4>sum: {sum} </h4>}
      <button onClick={() => setSum (2)}>sum=2</button> */}

      <h2>home</h2>
      <ul className="nav nav-tabs">
        <li>
          <NavLink to='news' className='list-group-item'>News</NavLink>
        </li>
        <li>
          <NavLink to='message' className='list-group-item'>Message</NavLink>
        </li>
      </ul>
      <Outlet/>
    </div>
  );
}



export default Home;
